The speech to be transmitted in a radio system is coded in a transmitter by means of a speech coder. An example of a speech coder is the ACELP (Algebraic Code Excited Linear Predictive) coder of the TETRA (Terrestrial Trunked Radio) system. The Tetra system is described in John Dunlop, Demessie Girma, James Irvine: Digital Mobile Communications and the TETRA System, John Wiley & Sons Limited 1999, ISBN 0-471-98792-1, incorporated as reference herein. The receiver comprises a speech decoder converting the speech information received back into speech that is understood by humans. If the speech coder itself comprises a speech decoder, the device is called a speech codec.
The digital speech information is channel-coded in a transmitter to prevent the adverse effects caused by the noise on the radio path. Channel codes may be error-detecting and/or error-correcting codes. In principle, the channel codes can be divided into block codes and convolutional codes. Both coding methods can be used simultaneously. One of the block codes is cyclic redundancy check, CRC. Further, convolutional coding and different modifications thereof, such as punctured convolutional coding, are typically used. A typical code rate for convolutional coding, in other words the ratio of the number of user data bits to the coded data bits of a channel, is for example ½ or ⅓. Interleaving is often used in addition to channel coding. In interleaving, the successive bits are mixed with each other for a longer period of time in such a way that a momentary fade on the radio path would not be sufficient to make the radio signal in this period unidentified but that the errors in the signal could still be eliminated by decoding the channel coding.
Information can be not only channel-coded but also encrypted to prevent tapping. Encryption is usually implemented in such a way that an encryption mask is created by means of an encryption algorithm, using certain input parameters, such as an encryption key, the encryption algorithm being connected to the information to be transmitted by means of an XOR operation (a logic exclusive OR operation). Encryption may be performed either prior to or after channel coding. There may be encryption on several levels, for example encryption over a radio interface, and point-to-point encryption for example between two mobile stations. The encryption can be decrypted in the receiver by using the same encryption algorithm that was used in the transmission, as far as the input parameters are also the same.
An error-detecting channel code, for example computation of a cyclic redundancy check, usually expresses the bit errors having entered the channel-coded speech frame on the radio path, whereby a bad frame indication, BFI, is sent to the speech decoder, from which indication the speech decoder detects that it is not advantageous to attempt to decode the speech frame concerned. Thus, the speech decoder generally utilizes a method in which the parameters of the preceding unbroken frame is used, the gain being at the same time attenuated.
However, in some cases, when the bits of a speech frame suitably invert on the radio path, the speech frame no longer contains acceptable data that could be decoded by a speech decoder, although on the basis of the channel code decoding, the speech frame is free of defects. Since there are a very large number of possible bit combinations in a speech frame, for example 2137 −1 different combinations in TETRA, it is in practice impossible to test them all. Thus, attempts to decode a defective speech frame may cause a very strong defective signal to exit from the output of the speech decoder, causing an unpleasant audio shock in the hearer's ears and at worst leading to a hearing defect.
The problem is made worse by the fact that in the TETRA system, for example, the intensity of sound in the loudspeaker of mobile stations is, according to clients' wishes, in the range of the maximum values allowed to maximize the audibility in noisy environments. Thus, even if the loudspeaker circuit has its own restriction of sound intensity, for instance 100 or even 110 decibels, this does not solve the problem. The problem is also made worse by the fact that in many radio systems, when the speech frame is defective, the decoding of the preceding speech frame is repeated by a speech decoder, so that if the preceding speech frame was defective as well, two defective speech frames are decoded successively.
Even if the channel coding could detect the errors, another problem, described in the following, may lead to an audio shock. In radio systems, for example in the GSM system (Global System for Mobile Communication), the encryption is usually decrypted before channel decoding. However, for instance in TETRA the decryption is not performed until after the channel decoding. Hence, the situation may be such that the speech frame containing speech is actually free of defects on the basis of the channel code, too, but for some reason, for example due to incorrect input parameters, the decryption puts the contents of the speech frame that is faultless as such in complete disorder. Although the speech decoder identifies bad speech frames on the basis of the channel code, for example by receiving a bad frame indication from the channel decoder when needed, it will not be able to identify the speech frame that the decryption has put in disorder, because this kind of speech frame does not receive a bad frame indication. Hereby, the speech decoder attempts to decode the speech frame that was put in disorder, causing again, in the worst case, an audio shock. The problem is more likely to arise because of the two-level encryption option in TETRA: radio interface encryption and point-to-point encryption. Users may set up their own encryption modules to perform point-to-point decryption in TETRA mobile stations, and thus the manufacturer of the device has no opportunity to check and test the operation of this kind of encryption module, because the encryption module processes information that is already channel-decoded. From the point of view of the device manufacturer, the encryption module is a black box, a decrypted speech frame coming out of the box in an ideal case. Further, there may be errors in updating encryption keys, if an incorrect encryption key is used as an input parameter of an encryption algorithm.